<template>
  <div class="container">
    <h2>{{ notice.title }}</h2>
    <div v-html="notice.content"></div>
  </div>
</template>

<script>
export default {
  name: "NoticeDetail",
  data() {
    return {
      notice: "",
    };
  },
  mounted() {
    //发送get请求
    this.$axios
      .get("notice/" + this.$route.query.id)
      .then((response) => {
        //console.log(response);
        this.notice = response.data.data;
      })
      .catch((error) => console.log(error)); // 请求失败处理
  },
};
</script>